<?php
#  Gfanqiang - Software suite for breakthrough GFW
#
#  by Hong Kong Network Institute of Liberty(NIL), licensed under The GNU General Public License v3.0
#  You should have received a copy of the GNU General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.
#  
#  makegserver.inc.php - Reslove Google Server IP

$gservers=array();
$gdomains=array("www.google.com","mail.google.com","www.l.google.com","mail.l.google.com");

/* Grab GServer using DNS way */
foreach($gdomains as $gdomain){
	$dns_responses=dns_get_record($gdomain,DNS_A);
	foreach($dns_responses as $dns_response){
		array_push($gservers,$dns_response["ip"]);
	}
}

$gservers=array_unique($gservers);

/* PUBLIC FUNCTION */
function filter_cn($host){
	return(! preg_match("/^74\.125\./",$host));
}
?>